export default

	function Merge1(str: string) {

	const arr = str.split('');
	let a = 0;
	// let b = 0;
	let c = 0;
	const obj = {};
	arr.forEach((item, i) => {
		if (item === '(') {
			if (a === 0) {
				obj[c] = { begin: i, end: 0 };
			}
			a++;
			// b++;
		}
		if (item === ')') {
			// b--;
			a--;
			if (a === 0) {
				obj[c].end = i;
				c++;
			}
		}
	});
	// console.log(b);

	if (JSON.stringify(obj) === '{}') {
		return [];
	} else {
		const res = new Array() as string[];
		for (const item in obj) {
			if (obj.hasOwnProperty(item)) {
				res.push(str.substring(obj[item].begin + 1, obj[item].end));
			}
		}
		return res;
	}

}
